﻿using System;
using System.Data;
using System.Configuration;
using System.Xml.XPath;
using System.Xml;
using System.Text;
using System.IO;
using System.Collections.Generic;
using System.Web.UI;
using System.ComponentModel;

namespace aucn.web.au
{
    [Bindable(true)]
    [Serializable]
	public class Department
	{
        private string _id, _name, _chname, _desc, _common, _xmlFilePath;
        private List<Major> _majors;

        [Bindable(true)]
        public string DeptId { get { return this._id; } set { this._id = value; } }
        [Bindable(true)]
        public string DeptName { get { return this._name; } set { this._name = value; } }
        [Bindable(true)]
        public string DeptChName { get { return this._chname; } set { this._chname = value; } }
        [Bindable(true)]
        public string Description { get { return this._desc; } set { this._desc = value; } }
        [Bindable(true)]
        public string CommonSubjects { get { return this._common; } set { this._common = value; } }
        [Bindable(true)]
        public List<Major> MajorList { get { return this._majors; } set { this._majors = value; } }

        public Department(string id, string name, string chName, string desc, string career, string common, List<Major> majorList)
        {
            this._id = id;
            this._name = name;
            this._chname = chName;
            this._desc = desc;
            this._common = common;
            this._majors = majorList;
        }
	}

    [Serializable]
    [Bindable(true)]
    public class Major
    {
        private string _name, _chname, _subjects, _career, _desc, _target;
        private bool _isNew;
        public string MajorName { get { return this._name; } set { this._name = value; } }
        public string MajorChName { get { return this._chname; } set { this._chname = value; } }
        public string Subjects { get { return this._subjects; } set { this._subjects = value; } }
        public string Career { get { return this._career; } set { this._career = value; } }
        public string Target { get { return this._target; } set { this._target = value; } }
        public string Description { get { return this._desc; } set { this._desc = value; } }
        public bool IsNew { get { return this._isNew; } set { this._isNew = value; } }

        public Major(string name, string chName, string desc, string career, string target, string subjects)
        {
            this._name = name;
            this._chname = chName;
            this._subjects = subjects;
            this._career = career;
            this._target = target;
            this._desc = desc;
            this._isNew = false;
        }

        public Major(string name, string chName, string desc, string career, string target, string subjects, bool isNew)
        {
            this._name = name;
            this._chname = chName;
            this._subjects = subjects;
            this._career = career;
            this._target = target;
            this._desc = desc;
            this._isNew = isNew;
        }
    }
}
